package com.example.blog.utils;

import java.text.SimpleDateFormat;
import java.util.Date;

public class DataUtils {
    public static String format(Date date){
        if(date == null){
            return "";
        }
        //2024-04-24 18:00
        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm");
        return format.format(date);
    }
}
